//
// Decompiled by Jadx - 426ms
//
package fg;

import android.app.Activity;
import android.view.View;
import de.robv.android.xposed.XposedHelpers;
import fg.p;
import fi.e;
import fi.w;
import fn.j;
import gc.aw;
import gc.z;
import java.util.List;
import me.plusne.common.Json.JsonPick;
import me.plusne.common.Json.Soul.JsonSelectUser;
import org.luckypray.dexkit.result.FieldData;
import r.f;
import r.g;

public final class m implements View.OnClickListener {
    public final int a;
    public final Object b;
    public final Object c;
    public final Object d;
    public final Object e;

    public m(Object obj, Object obj2, Object obj3, Object obj4, int i) {
        this.a = i;
        this.b = obj;
        this.c = obj2;
        this.d = obj3;
        this.e = obj4;
    }

    @Override
    public final void onClick(View view) {
        f i;
        String str;
        String str2;
        switch (this.a) {
            case 0:
                p.a aVar = (p.a) this.b;
                Activity activity = (Activity) this.c;
                JsonPick.DataBean dataBean = (JsonPick.DataBean) this.d;
                p pVar = (p) this.e;
                aVar.getClass();
                w wVar = new w(activity);
                wVar.aj = "兑换奖品";
                wVar.bb();
                wVar.bj(fi.e.INPUT);
                StringBuilder sb = new StringBuilder();
                sb.append(dataBean.getApp());
                StringBuilder sb2 = new StringBuilder(" (");
                if (dataBean.getData() == 0) {
                    str2 = "永久版";
                } else {
                    str2 = dataBean.getData() + "天";
                }
                sb2.append(str2);
                sb2.append(")");
                sb.append(g.l(sb2.toString(), "#F7941D"));
                wVar.ak = sb.toString();
                wVar.bb();
                wVar.r = "兑换";
                wVar.bb();
                wVar.w = new n(aVar, activity, dataBean, pVar);
                wVar.bk();
                return;
            default:
                aw awVar = (aw) this.b;
                fh.f fVar = (fh.f) this.c;
                w wVar2 = (w) this.d;
                Object obj = this.e;
                FieldData fieldData = aw.cp;
                awVar.getClass();
                List<JsonSelectUser> list = fVar.b;
                if (list != null && !list.isEmpty() && fVar.e() > 0) {
                    wVar2.c.dismiss();
                    int i2 = 0;
                    for (JsonSelectUser jsonSelectUser : list) {
                        if (jsonSelectUser.isCheckBox()) {
                            j.bn(obj, "sessionId", z.eb() + jsonSelectUser.getUserID());
                            j.bn(awVar.ct, "to", jsonSelectUser.getUserID());
                            j.bn(awVar.ct, "msgId", z.dz());
                            XposedHelpers.setLongField(awVar.ct, "serverTime", System.currentTimeMillis());
                            XposedHelpers.setLongField(awVar.ct, "localTime", System.currentTimeMillis() - 1000);
                            i2++;
                            Object obj2 = awVar.ct;
                            synchronized (awVar) {
                                awVar.cr.add(obj2);
                                if (!awVar.cs) {
                                    awVar.cs = true;
                                    awVar.dc();
                                }
                            }
                        }
                    }
                    i = f.i();
                    i.k();
                    str = "成功转发:" + i2 + " 个好友";
                } else {
                    i = f.i();
                    i.j();
                    str = "未选择任何联系人";
                }
                i.l(str);
                return;
        }
    }
}
